<!-- src/main/resources/templates/user/edit.html -->
<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>编辑用户</title>
    <link rel="stylesheet" type="text/css" th:href="@{/css/editstyles.css}">
</head>
<body>
<h2>编辑用户</h2>

<form th:object="${user}" th:action="@{'/user/edit/' + ${user.id}}" method="post">
    <label>用户编号:</label>
    <input type="text" th:field="*{id}" readonly="readonly" />

    <label>邮箱地址:</label>
    <input type="text" th:field="*{email}" />

    <label>个人介绍:</label>
    <textarea th:field="*{info}"></textarea>

    <label>用户密码:</label>
    <input type="text" th:field="*{password}" />

    <label>电话号码:</label>
    <input type="text" th:field="*{phone}" />

    <label>QQ号码:</label>
    <input type="text" th:field="*{qq}" />

    <label>用户名称:</label>
    <input type="text" th:field="*{username}" />

    <button type="submit">保存</button>
    <a th:href="@{/user/findAll}" class="cancel-btn">取消</a>
</form>
</body>
</html>
